package com.zpl.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zpl.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(value = "购物车", description = "购物车实体")
@TableName("cart")
public class Cart extends BaseEntity {
    @ApiModelProperty(value = "会员id", required = true)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField(value="member_id")
    private Long memberId;
    @ApiModelProperty(value = "商品id", required = true)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField(value="good_id")
    private Long goodId;
    @ApiModelProperty(value = "商品数量", required = true)
    @TableField(value="good_num")
    private int goodNum;
    @ApiModelProperty(value = "是否被选中（0：未被选中，1：已被选中）", required = true)
    @TableField(value="checked")
    private int checked;
}
